-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin adjustable components #5791
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elia
approved these changes
Jun 14, 2024
admin/app/components/solidus_admin/orders/show/adjustments/index/component.rb
Outdated
Show resolved
Hide resolved
admin/app/components/solidus_admin/orders/show/adjustments/index/component.rb
Show resolved
Hide resolved
mamhoff
force-pushed
the
admin-adjustable-components
branch
from
June 14, 2024 09:40
7e8a61a
to
1a049d4
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5791 +/- ##
==========================================
+ Coverage 88.68% 88.76% +0.08%
==========================================
Files 721 726 +5
Lines 16997 17023 +26
==========================================
+ Hits 15073 15111 +38
+ Misses 1924 1912 -12 ☔ View full report in Codecov by Sentry. |
mamhoff
force-pushed
the
admin-adjustable-components
branch
from
June 14, 2024 09:53
1a049d4
to
56e4ac4
Compare
tvdeyen
approved these changes
Jun 14, 2024
This is used in a number of other places. Also, this adds icons to the adjustment source components, which looks nice (and was probably intended).
It will otherwise get confusing when we add adjustables.
This allows us to remove a bunch of untested (and untestable) code. Especially the `else` block in `figcaption_for_adjustable` is impossible to reach, as only orders, line items and shipments are adjustable. If people have their own adjustable objects, they can now just add a component.
mamhoff
force-pushed
the
admin-adjustable-components
branch
2 times, most recently
from
June 20, 2024 13:46
7e54efb
to
5955fb2
Compare
mamhoff
force-pushed
the
admin-adjustable-components
branch
from
June 20, 2024 13:58
5955fb2
to
ec15751
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This applies the same pattern to adjustment adjustables (line items, order, an shipments) as we have already done to adjustment sources. In order to distinguish the two namespaces, it changes the
adjustment
namespace tosource
, and adds anadjustable
namespace.The HTML needed for the pattern is moved to the
UI
namespace, with a new component,ThumbnailWithCaption
.With this commit, adjustment sources also get icons. I feel this was intended from the get-go but somehow missed. Here's the difference:
Before:
After: